package com.shao.demo.clientdemo1.web;

import com.shao.demo.clientdemo1.config.AppConfig;
import com.shao.demo.clientdemo1.wapper.ResponseEntityWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhiqi.shao
 * @Date 2018/5/15 18:47
 */
@Slf4j
@RestController
public class UserController {

    @Autowired
    private AppConfig appConfig;

    @GetMapping(value = "/hello")
    public ResponseEntityWrapper sayHello(@RequestParam  String name){
        log.info("request accept  ***********************name:{}",name);
        System.out.println("imgUrl:"+appConfig.getImgUrl());
        return ResponseEntityWrapper.success(name);
    }
}
